package com.example.zwgt.yrfk.ui.main.fragment;


import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.RelativeLayout;

import com.example.zwgt.yrfk.R;
import com.example.zwgt.yrfk.base.mvpbase.BasePresenter;
import com.example.zwgt.yrfk.base.mvpbase.baseImpl.BaseFragment;
import com.example.zwgt.yrfk.ui.main.activity.LoginActivity;
import com.example.zwgt.yrfk.ui.mine.activity.WebViewActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

public class MyFragment extends BaseFragment {

    @BindView(R.id.myscore)
    RelativeLayout myscore;
    @BindView(R.id.mypwd)
    RelativeLayout mypwd;
    @BindView(R.id.profile)
    RelativeLayout profile;
    @BindView(R.id.contact)
    RelativeLayout contact;
    @BindView(R.id.about)
    RelativeLayout about;
    @BindView(R.id.cooperation)
    RelativeLayout cooperation;
    @BindView(R.id.btn_outlogin)
    Button btn_outlogin;
    @Override
    protected int getLayoutResource() {
        return R.layout.fragment_mine;
    }

    @Override
    protected void initView() {

    }

    @Override
    public BasePresenter initPresenter() {
        return null;
    }


    @OnClick({R.id.mypwd, R.id.myscore, R.id.profile,R.id.about, R.id.cooperation,R.id.contact,R.id.btn_outlogin})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.mypwd:
                //登录密码
                break;
            case R.id.myscore:
                //我的评分
                break;
            case R.id.profile:
                //公司简介
                Intent intent4 = new Intent(getActivity(), WebViewActivity.class);
                intent4.putExtra("url", "http://api.zwgt.com/index-app_zwgt.html");
                getActivity().startActivity(intent4);
                break;
            case R.id.about:
                Intent intent5 = new Intent(getActivity(), WebViewActivity.class);
                intent5.putExtra("url", "http://api.zwgt.com/index-app_product.html");
                getActivity().startActivity(intent5);
                break;
            case R.id.cooperation:
                Intent intent6 = new Intent(getActivity(), WebViewActivity.class);
                intent6.putExtra("url", "http://api.zwgt.com/index-app_partner.html");
                getActivity().startActivity(intent6);
                break;
            case R.id.contact:
                //联系我们
                Intent intent7 = new Intent(getActivity(), WebViewActivity.class);
                intent7.putExtra("url", "http://api.zwgt.com/index-app_contact.html");
                getActivity().startActivity(intent7);
                break;
            case R.id.btn_outlogin:
                getActivity().finish();
                startActivity(new Intent(getActivity().getBaseContext(), LoginActivity.class));
                break;
        }
    }
}
